home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00023_Script_animationH-LR < prev    next >
Text File  |  1999-04-25  |  1KB  |  57 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14. on getBehaviorDescription
  15.   return "simulates 2D object movie."
  16. end
  17.  
  18. on mousedown
  19.   global oldIndex,sseq,eseq,oldH
  20.   
  21.   repeat while the mouseDown
  22.     set index = the mouseh
  23.     set curH = the mouseH
  24.     set changeH = abs(oldH - curH)
  25.     set changeV = abs(index-oldIndex)
  26.     if changeH >= changeV then
  27.       set movedHoris = TRUE
  28.     else
  29.       set movedHoris = FALSE
  30.     end if
  31.     
  32.     if movedHoris then
  33.       if index < oldIndex-2  and oldIndex <> 0  then
  34.         if the frame > sseq then go to the frame -1
  35.         
  36.       else 
  37.         if index > oldIndex+2 and oldIndex <> 0 then
  38.           if the frame < eseq then  go to the frame +1 
  39.           
  40.         end if
  41.       end if
  42.     end if
  43.     
  44.     updateStage
  45.     set oldIndex = index
  46.     set oldH = curH
  47.   end repeat
  48.   pass
  49. end
  50.  
  51. on mouseup 
  52.   global oldIndex,oldH
  53.   set oldIndex = 0
  54.   set oldH = 0
  55.   pass
  56. end
  57.